Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because it was impossible to follow what was going on, this pull-request contains a re-layout of the inlined matrix in chunks of 32 (8x4), so that later indexes that need to be replaced can be easily counted through.
The below code already fixes:
9
fires 57,
fires 188-
fires 189.
fires 1901
, shitty github markdown, yo)[
fires 219\
fires 220]
fires 221'
fires 222The current way of translating keys between ranges isn't failsafe. Currently these keycodes cannot be fixed:
;
fires 186, position is array index 58=
fires 187, position is array index 60/
fires 191, position is array index 46The reason why this currently cannot be fixed is that the code in the UIInterface assumes that keycodes that are lower than
127
are always a 1:1 mapping; which isn't the case for these three keys.Actually these three keys are the only cases where this doesn't apply, as the rest of the keyboard (speaking of 105/106 keys) works perfectly, including all special keys except
Fn
on laptops, but that's okay.I guess in order to complete this, I need to talk with @paraboul on how to solve this properly. Either use the complete matrix in every case (so add all keycodes below 127 in it, too); or make some if/else comparisons inside UIInterface regarding SDL special characters, because the translation bitshift is wrong in above three cases - so they need to be done before the matrix lookup.